package edu.itstudy.modle;

import java.io.*;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * movie属性
 */
public class Movie implements Serializable {

    private int mid;//电影ID
    private String name;//电影名称
    private String type;//电影类型
    private String performer;//主演
    private Date date;//上映时间
    private String guider;//导演
    private int clickRate;//点击率
    private int recommendRate;//推荐率
    private int index  ;//临时序号

    public int getIndex() {
        return index;
    }





    public void setIndex(int index) {
        this.index = index;
    }

    /**
     * 构造器
     */
    public Movie(){

    }
    /**
     * 构造器
     */
    public Movie(int mid, String name, String type, String performer, Date date, String guider, int clickRate, int recommendRate) {
        this.mid = mid;
        this.name = name;
        this.type = type;
        this.performer = performer;
        this.date = date;
        this.guider = guider;
        this.clickRate = clickRate;
        this.recommendRate = recommendRate;
    }

    /**
     * get/set
     * @return
     */
    public int getMid() {
        return mid;
    }

    public void setMid(int mid) {
        this.mid = mid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getPerformer() {
        return performer;
    }

    public void setPerformer(String performer) {
        this.performer = performer;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getGuider() {
        return guider;
    }

    public void setGuider(String guider) {
        this.guider = guider;
    }

    public int getClickRate() {
        return clickRate;
    }

    public void setClickRate(int clickRate) {
        this.clickRate = clickRate;
    }

    public int getRecommendRate() {
        return recommendRate;
    }

    public void setRecommendRate(int recommendRate) {
        this.recommendRate = recommendRate;
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        return super.equals(obj);
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    @Override
    protected void finalize() throws Throwable {
        super.finalize();
    }

    /**tostring
     *
     */
    @Override
    public String toString() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");

        return "Movie{" +
                "mid=" + mid +
                ", name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", performer='" + performer + '\'' +
                ", date=" + sdf.format(date) +
                ", guider='" + guider + '\'' +
                ", clickRate=" + clickRate +
                ", recommendRate=" + recommendRate +
                '}';
    }
}
